<?php

use Illuminate\Support\Facades\Route;
use App\Livewire\Pages\Home;
use Yansongda\LaravelPay\Facades\Pay;
use BaconQrCode\Renderer\ImageRenderer;
use BaconQrCode\Renderer\Image\ImagickImageBackEnd;
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
use BaconQrCode\Writer;
use App\Http\Controllers\PaymentController;
use App\Livewire\ComponentDetail;
use App\Http\Controllers\ComponentDetailController;
use App\Classes\ImportController;


Route::get('/', function(){
    return redirect()->route('filament.user.auth.login');
});

Route::get('login', function(){
   return redirect()->route('filament.user.auth.login');
})->name('login');

Route::group(['middleware' => 'auth'], function () {
    Route::get('alipay', [PaymentController::class, 'alipay'])->name('alipay');
    Route::get('alipay-return', [PaymentController::class, 'alipay_return'])->name('alipay.return');
    Route::get('component-detail/{id}', [ComponentDetailController::class, 'detail'])->name('component.detail');
    Route::post('/save-project', [ComponentDetailController::class, 'saveComponentProject'])->name('save.project');
    Route::post('/save-favorite', [ComponentDetailController::class, 'saveToFavorite'])->name('save.favorite');
});

Route::get('/import', [ImportController::class, 'importIndividual']);


